from selenium.webdriver.common.by import By
from add_member.page_objects.base_page import BasePage
import logging
import allure


class ContactPage(BasePage):

    _NAMES_LOC = (By.CSS_SELECTOR, '.member_colRight_memberTable_td:nth-child(2)')
    with allure.step("7.获取成员名字列表"):
        logging.info("获取成员名字列表")
        def get_member_names(self):

            print("获取成员名字列表")
            elements = self.finds(*self._NAMES_LOC)
            name_list = [ele.get_attribute("title") for ele in elements]

            return name_list